package com.hrm.mapper;

import com.hrm.pojo.Dept;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.sql.SQLException;
import java.util.List;

@Mapper
public interface DeptMapper {
    int deleteByPrimaryKey(Integer id);

//    int insert(Dept record);

    int insertSelective(Dept record);

    Dept selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Dept record);
    List<Dept> selectDeptListLikeName(String dept) throws SQLException;
    @Select("select * from dept_inf")
    List<Dept> selectDeptList() throws SQLException;
    @Select("select NAME from dept_inf where NAME=#{name}")
    String selectDeptName(String name) throws SQLException;
//    int updateByPrimaryKey(Dept record);
}